package com.elli0tt.session;

import java.sql.SQLException;
import java.util.List;
import java.util.Optional;

/**
 * @author elli0tt
 * @version 1.0
 * @className SqlSession.java
 * @description sql会话接口
 * @createTime 2020-08-28 21:53:43
 */
public interface SqlSession {

    <E> List<E> selectList(String statementId, Object... params) throws Exception;

    <E> E selectOne(String statementId, Object... params) throws Exception;

    <E>Optional<E> findOne(String statementId, Object... params) throws Exception;

    int update(String statementId, Object... params) throws Exception;

    <T> T getMapper(Class<T> mapperClass);

}
